void main(List<String> args) {
  
     // 准备购物车数据
  List carts = [
    {"count": 2, "price": 10.0, "selected": true},
    {"count": 1, "price": 30.0, "selected": false},
    {"count": 5, "price": 20.0, "selected": true}
  ];

  bool isAllSelected=getSelectedState(carts);
  print(isAllSelected);



}

 bool getSelectedState(List list){
   bool isAllSelected=true;

   list.forEach((item){
     if(!item["selected"]){
        isAllSelected=false;
     }
   });

   return isAllSelected;

}